package com.AJava1710D.设计模式.单例.懒汉式;

import java.io.Serializable;

/**
 * 作者: LCG
 * 日期: 2020/6/29 09:27
 * 描述:
 */
public class LanHanShi implements Serializable {

    private static LanHanShi lanHanShi;

    private LanHanShi() {

    }


    public static LanHanShi getInstance(){

        synchronized (LanHanShi.class){
            if(lanHanShi==null){
                lanHanShi = new LanHanShi();
                return lanHanShi;
            }else{
                return lanHanShi;
            }
        }

    }

}
